<template>
  <el-container>
    <el-header>
      <div>
        <img class="cmdb_logo" src="../assets/snow.png" alt="">
        <p class="cmdb_logo_p">CMDB</p>
      </div>
    </el-header>
    <el-container>
      <el-aside width="200px">
        <el-menu
          default-active="2"
          class="el-menu-vertical-demo"
          background-color="#545c64"
          text-color="#fff"
          active-text-color="#ffd04b">
          <el-submenu index="1">
            <template slot="title">
              <i class="el-icon-menu"></i>
              <span>资产环境管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="1-1">
                <router-link to="/Ecsinfo">
                  <template>
                    <i class="el-icon-info"></i>
                    <span>ECS信息</span>
                  </template>
                </router-link>
              </el-menu-item>
              <el-menu-item index="1-2">
                <router-link to="/SlbInfo">
                  <template>
                    <i class="el-icon-info"></i>
                    <span>SLB信息</span>
                  </template>
                </router-link>
              </el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="2">
            <template slot="title">
              <i class="el-icon-menu"></i>
              <span>容器环境管理</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="2-1">
                <router-link to="/containerInfo">
                  <template>
                    <i class="el-icon-info"></i>
                    <span>容器信息</span>
                  </template>
                </router-link>
              </el-menu-item>
              <el-menu-item index="2-2">
                <router-link to="/ProjectAdd">
                  <template>
                    <i class="el-icon-circle-plus"></i>
                    <span>项目添加</span>
                  </template>
                </router-link>
              </el-menu-item>
              <el-menu-item index="2-3">
                <router-link to="/EnvironmentClean">
                  <template>
                    <i class="el-icon-remove"></i>
                    <span>环境清理</span>
                  </template>
                </router-link>
              </el-menu-item>
              <el-menu-item index="2-4">
                <router-link to="/autoDeploy">
                  <template>
                    <i class="el-icon-info"></i>
                    <span>自动发布</span>
                  </template>
                </router-link>
              </el-menu-item>
            </el-menu-item-group>
          </el-submenu>
          <el-submenu index="3">
            <template slot="title">
              <i class="el-icon-menu"></i>
              <span>运维专用工具</span>
            </template>
            <el-menu-item-group>
              <el-menu-item index="3-1">
                <router-link to="/EcsExpand">
                  <template>
                    <i class="el-icon-info"></i>
                    <span>ECS节点扩容</span>
                  </template>
                </router-link>
              </el-menu-item>
              <el-menu-item index="3-2">
                <router-link to="/uidManage">
                  <template>
                    <i class="el-icon-circle-plus"></i>
                    <span>内部帐号管理</span>
                  </template>
                </router-link>
              </el-menu-item>
            </el-menu-item-group>
          </el-submenu>
        </el-menu>
      </el-aside>
      <el-main>
        <router-view></router-view>
      </el-main>
    </el-container>
  </el-container>
</template>

<style scoped>
  .cmdb_logo_p {
    position: absolute;
    left: 65px;
    width: 100px;
    font-size: 30px;
    top: -25px;
  }
  .cmdb_logo {
    position: absolute;
    top: 10%;
    left: 5px;
    width: 50px;
  }
  .el-header, .el-footer {
    background-color: #495259;
    color: #333;
    text-align: center;
    line-height: 60px;
    position: relative;
  }
  .el-container {
    height: 100%;
  }
  .el-aside {
    background-color: #495259;
    color: #333;
    text-align: center;
    line-height: 200px;
  }

  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
    line-height: 160px;
  }

  body > .el-container {
    margin-bottom: 40px;
  }

  .el-container:nth-child(5) .el-aside,
  .el-container:nth-child(6) .el-aside {
    line-height: 260px;
  }

  .el-container:nth-child(7) .el-aside {
    line-height: 320px;
  }
  .router-link-active {
    text-decoration: none;
    color: #ffd04b;
  }
  a {
    text-decoration: none;
    color: #fff;
  }
</style>
